package com.ygqh.baby.service;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.YgExchangeOrderDetail;
import com.ygqh.baby.po.YgReturnOrderDetail;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface YgReturnOrderDetailService {

	List<YgReturnOrderDetail> find();

	int findCount();

	YgReturnOrderDetail findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(YgReturnOrderDetail ygReturnOrderDetail);

	int update(YgReturnOrderDetail ygReturnOrderDetail);

	int saveOrUpdate(YgReturnOrderDetail ygReturnOrderDetail);

	ResultSet<YgReturnOrderDetail> search(QueryInfo queryInfo, String q);

	List<YgReturnOrderDetail> findByReturnCode(String returnCode);

	int saveExchangeOrderDetailBatch(List<YgExchangeOrderDetail> exchangeDetail);

	YgReturnOrderDetail findByReturnCodeWithSkuId(String returnCode, Long skuId);

	int updateSendBatch(List<YgReturnOrderDetail> detailList);

	List<Map<String, Object>> getReturnInStockDetail(String returnType, Date startDate, Date endDate,
													 String[] questionDesc);

	int updateDetailStatusBatch(List<YgReturnOrderDetail> rodList);

	/**
	 * 批量保存退换货明细
	 *
	 * @param returnOrderDetailList returnOrderDetailList
	 * @return
	 */
	int saveBatch(List<YgReturnOrderDetail> returnOrderDetailList);

	/**
	 * 获取换货单明细集
	 *
	 * @param returnCodeList 换货单号集
	 * @return
	 */
	List<YgReturnOrderDetail> findByReturnCodeList(List<String> returnCodeList);

	int updatePriceBatch(List<YgReturnOrderDetail> detailList);
}
